home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
u_man
/
cat3
/
Tk
/
restrictev.z
/
restrictev
Wrap
Text File
|
1998-10-30
|
5KB
|
133 lines
TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttEEEEvvvveeeennnnttttssss((((3333TTTTkkkk)))) TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttEEEEvvvveeeennnnttttssss((((3333TTTTkkkk))))
NNNNAAAAMMMMEEEE
Tk_RestrictEvents - filter and selectively delay X events
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
####iiiinnnncccclllluuuuddddeeee <<<<ttttkkkk....hhhh>>>>
Tk_RestrictProc *
TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttEEEEvvvveeeennnnttttssss(_p_r_o_c, _a_r_g, _p_r_e_v_A_r_g_P_t_r)
AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
Tk_RestrictProc *_p_r_o_c (in) Predicate procedure to call to
filter incoming X events.
NULL means do not restrict
events at all.
char *_a_r_g (in) Arbitrary argument to pass to
_p_r_o_c.
char **_p_r_e_v_A_r_g_P_t_r (in/out) Pointer to place to save
argument to previous restrict
procedure.
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
This procedure is useful in certain situations where applications are
only prepared to receive certain X events. After TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttEEEEvvvveeeennnnttttssss is
called, TTTTkkkk____DDDDooooOOOOnnnneeeeEEEEvvvveeeennnntttt (and hence TTTTkkkk____MMMMaaaaiiiinnnnLLLLoooooooopppp) will filter X input events
through _p_r_o_c. _P_r_o_c indicates whether a given event is to be processed
immediately or deferred until some later time (e.g. when the event
restriction is lifted). _P_r_o_c is a standard X predicate procedure, of the
sort passed to XXXXCCCChhhheeeecccckkkkIIIIffffEEEEvvvveeeennnntttt. It must have arguments and result that
match the type TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttPPPPrrrroooocccc:
typedef Bool Tk_RestrictProc(
Display *_d_i_s_p_l_a_y,
XEvent *_e_v_e_n_t_P_t_r,
char *_a_r_g);
The _d_i_s_p_l_a_y argument to _p_r_o_c is the display from which _e_v_e_n_t_P_t_r was
received, and _e_v_e_n_t_P_t_r points to an event under consideration. The _a_r_g
argument is a copy of the _a_r_g passed to TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttEEEEvvvveeeennnnttttssss; it may be
used to provide _p_r_o_c with information it needs to filter events. _P_r_o_c
must return TTTTrrrruuuueeee or FFFFaaaallllsssseeee. TTTTrrrruuuueeee means the event should be processed
immediately and FFFFaaaallllsssseeee means the event should not be processed now, but
should be saved for some later time.
TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttEEEEvvvveeeennnnttttssss uses its return value and _p_r_e_v_A_r_g_P_t_r to return
information about the current event restriction procedure (a NULL return
value means there are currently no restrictions). These values may be
used to restore the previous restriction state when there is no longer
any need for the current restriction.
PPPPaaaaggggeeee 1111
TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttEEEEvvvveeeennnnttttssss((((3333TTTTkkkk)))) TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttEEEEvvvveeeennnnttttssss((((3333TTTTkkkk))))
There are very few places where TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttEEEEvvvveeeennnnttttssss is needed. Please use
it only where it is absolutely necessary. If only a local restriction is
needed, it can probably be achieved more cleanly by changing event-to-Tcl
bindings or by calling TTTTkkkk____DDDDeeeelllleeeetttteeeeEEEEvvvveeeennnnttttHHHHaaaannnnddddlllleeeerrrr.
KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
delay, event, filter, restriction
PPPPaaaaggggeeee 2222